package com.zyg.service.impl;

import com.zyg.dao.ClassMapper;
import com.zyg.pojo.Class;
import com.zyg.service.ClassService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("classService")
public class  ClassServiceImpl implements ClassService {

    @Autowired
    private ClassMapper classMapper;

    @Override
    public List<Class> findAll(Class classObj, int offset, int pageSize) {
        return classMapper.findAll(classObj, offset, pageSize);
    }

    @Override
    public List<Class> getClassList() {
        return classMapper.getClassList();
    }

    @Override
    public int addClass(Class classObj) {
        return classMapper.addClass(classObj);
    }

    @Override
    public int deleteClass(int id) {
        return classMapper.deleteClass(id);
    }

    @Override
    public Class findClassById(int id) {
        return classMapper.findClassById(id);
    }

    @Override
    public int updateClass(Class classObj) {
        return classMapper.updateClass(classObj);
    }

    @Override
    public int count(Class classObj) {
        return classMapper.count(classObj);
    }
}
